const {
  versionID,
  packageID,
  packageID1,
  packageID2,
  packageID3,
  packageID4,
  rootID
} = require("../generator");

module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.bulkInsert(
      "t_version_package",
      [
        {
          version_id: versionID,
          id: packageID,
          package_name: "双11新页面",
          status: "000",
          next_status: "001",
          remark: "待提交状态",
          refuse_reason: "",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          version_id: versionID,
          id: packageID1,
          package_name: "双12新页面",
          status: "001",
          next_status: null,
          remark: "待审核状态",
          refuse_reason: "",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          version_id: versionID,
          id: packageID2,
          package_name: "双13新页面",
          status: "100",
          next_status: null,
          remark: "生效中状态",
          refuse_reason: "",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          version_id: versionID,
          id: packageID3,
          package_name: "双14新页面",
          status: "200",
          next_status: null,
          remark: "未通过状态",
          refuse_reason: "",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          version_id: versionID,
          id: packageID4,
          package_name: "双14新页面",
          status: "201",
          next_status: null,
          remark: "已失效状态",
          refuse_reason: "",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        }
      ],
      {}
    );
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.bulkDelete("t_version_package", null, {});
  }
};
